<?php

namespace App\Http\Service;

use App\Http\Model\Article;
use App\Http\Repository\ArticleRepository;
use App\Http\Criteria\IsActiveCriteria;

class ArticleService extends BaseService
{
    protected $rep;

    public function __construct(ArticleRepository $repository)
    {
        $this->rep = $repository;

    }

    public function getDetail($id)
    {
        $this->rep->pushCriteria(new IsActiveCriteria());
        return $this->rep->find($id);
    }

}
